package cn.z2huo.leetcode.problem.NO_0002;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author z2huo
 */
@Data
@NoArgsConstructor
class ListNode {

    int val;

    ListNode next;

    public ListNode(int val) {
        this.val = val;
    }

    public ListNode(int val, ListNode next) {
        this.val = val;
        this.next = next;
    }

    @Override
    public String toString() {
        return val + "" + (next == null ? "" : next);
    }
}
